import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import autoprefixer from 'autoprefixer'
import tailwindcss from 'tailwindcss'
import legacy from '@vitejs/plugin-legacy'

// https://vite.dev/config/
export default defineConfig({
	css: {
		postcss: {
			plugins: [
				tailwindcss(),
				autoprefixer({
					overrideBrowserslist: ['Chrome > 40', 'ff > 31', 'ie >= 11'],
				}),
			],
		},
	},
	plugins: [
		vue(),
		legacy({
			targets: ['cover 99.5%'],
		}),
	],
	optimizeDeps: {
		include: ['core-js'],
	},
	resolve: {
		alias: {
			'@': '/src',
		},
	},
})
